package xyz.hubery.controller;

import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.hubery.domain.SysUser;
import xyz.hubery.model.R;
import xyz.hubery.service.SysUserService;

import java.util.List;

@RestController
@Api(tags = "admin-service测试接口")
public class TestController {

    @Autowired
    private SysUserService userService;

    @GetMapping("/admin/test")
    public R<SysUser> getUser() {
        List<SysUser> list = userService.list();
        return R.ok(list.get(0));
    }
}
